package com.iMusic.presentationLayer;

import java.io.IOException;
import java.sql.Date;
import java.sql.SQLException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;


import com.iMusic.businessLogicLayer.Feedback;

import com.iMusic.util.UserMessages;

public class CreateFeedback extends HttpServlet {

	public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
			
		Feedback feedback = new Feedback();
		String redirection = "default.jsp";
		
		HttpSession session = request.getSession();
		
		feedback.setDescription((String) request.getParameter("Description"));
		
		try {
			feedback.submit();
		} catch (SQLException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		
		response.sendRedirect(redirection);
	}
}